package com.emergency.embackend.mapper;

import com.emergency.embackend.common.PageParams;
import com.emergency.embackend.entity.Article;
import com.emergency.embackend.param.ArticleDataParam;
import com.emergency.embackend.param.ArticleParam;
import com.emergency.embackend.vo.ArticleVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WikiArticleMapper {
    List<ArticleVO> getArticleData(ArticleDataParam articleDataParam);

    void delete(Long articleId);

    void deleteByTypeId(Long typeId);

    ArticleVO getOne(Long articleId);

    void update(ArticleParam articleParam);

    void add(ArticleParam articleParam);

    List<ArticleVO> selectArticlesByCreateTimeDesc();

    List<ArticleVO> getHotArticle();

    List<Long> getTypeIds(List<Long> articleIds);

    Long getViewCount(Long videoId);

    List<ArticleVO> getHistoryArticle(@Param("articleIds")List<Long> articleIds);
}
